@ECHO OFF
SET POLIPO_EXE_PATH=E:\polipo\polipo.exe
ECHO path of polipo.exe is %POLIPO_EXE_PATH%

:: %~dp0 means the [d]river and [p]ath of current file (the 0th argument).
SET POLIPO_BAT_PATH=%~dp0
:: substring: %VARIABLE:~<offset>,<length>%
:: %POLIPO_BAT_PATH:~0,-1% will strip the last backslash in the path.
SET POLIPO_CONF_PATH=%POLIPO_BAT_PATH:~0,-1%\polipo.conf
ECHO path of configuration is %POLIPO_CONF_PATH%

ECHO.
ECHO Starting Polipo...
START "Polipo" "%POLIPO_EXE_PATH%" -c "%POLIPO_CONF_PATH%"
ECHO Polipo started.

::PAUSE